#!/usr/bin/env python
# -*- coding: utf-8 -*-
#author:Mike Coats
#project:MyMovieMetadata

import tmdb


class MyClass:
    def f(self):
        print ' Entering'
        
        sr = tmdb.search("fight club")
        fr = sr[0]
        mid = fr['id']
        movie = tmdb.getMovieInfo(mid)
        print '  ' + movie['cast']['director']
        filmId = tmdb.MovieDb().search("Fight Club")[0]['id']
        film = tmdb.MovieDb().getMovieInfo(filmId)
        poster = film['images'].posters[0]
        print '  ' + poster
        for key, value in poster.items():
            if key not in ['type','id']:
                print '   ' + key + ' ' + value








        print ' Exiting'

    
def main():
    print u'Starting'

    app = MyClass()
    app.f()

    print u'Finishing'
    
if __name__ == '__main__':
    main()